﻿@model PortalWeb.Areas.Admin.Models.EditUserViewModel
@{  
    Layout = null;
    ViewBag.Title = "用户编辑";
}
@using (Ajax.BeginForm("Edit", "User", new AjaxOptions
{
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "OnSuccess"
}, new {@class = "form-horizontal", role = "form"}))
{
    @Html.AntiForgeryToken()
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 id="myModalLabel" class="modal-title">@ViewBag.Title</h4>
        </div>
        <div class="modal-body">
            @Html.ValidationSummary(true)
            <div class="form-group">
                @Html.LabelFor(model => model.UserName, new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.UserName)
                    @Html.ValidationMessageFor(model => model.UserName)
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.PhoneNumber, new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.PhoneNumber)
                    @Html.ValidationMessageFor(model => model.PhoneNumber)
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.NickName, new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.NickName)
                    @Html.ValidationMessageFor(model => model.NickName)
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.Email, new {@class = "control-label col-md-2"})
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Email)
                    @Html.ValidationMessageFor(model => model.Email)
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="submit" class="btn btn-primary">保存</button>
            <button class="btn  btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
        </div>
    </div>
}
